package com.gr.dmbackend.controller.account;

import com.gr.dmbackend.service.account.UpdatePhotoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

@RestController
public class UpdatePhotoController {
    @Autowired
    private UpdatePhotoService updatePhotoService;

    @PostMapping("/api/account/update-photo")
    public Map<String, String> updatePhoto(@RequestParam("file") MultipartFile file) {
        return updatePhotoService.updatePhoto(file);
    }
}